export default [
    {
        path : '/',
        redirect : { name : 'console' }
    }, {
        path : '/console',
        name : 'console',
        meta :  { title : '控制台', permission : '' },
        component : () => import(/* webpackChunkName: "layout" */ "@/components/layout/CBasicLayout"),
    },{
        path : '/binding',
        name : 'binding',
        meta :  { title : '账号绑定' },
        component : () => import(/* webpackChunkName: "layout" */ "@/views/binding/Index"),
        props : (route) => ({
            user : route.params.user,
            callback : route.query.callback ? decodeURI(route.query.callback) : '/index'
        })
    },{
        path : '/oauth',
        name : 'oauth',
        meta :  { title : '登录' },
        component : () => import(/* webpackChunkName: "layout" */ "@/views/oauth/Index"),
        props : (route) => ({
            code : route.query.code,
            flag : route.query.flag,
            callback : route.query.callback ? decodeURI(route.query.callback) : '/index'
        })
    },{
        path : '/logout',
        name : 'logout',
        meta :  { title : '退出' },
        component : () => import(/* webpackChunkName: "layout" */ "@/views/oauth/Logout"),
    }
];
